package br.com.criativasystem.helper;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Classe responsavel pela conexão com banco de dados
 * @author Lucas Calixto
 */
public class BD {
    
    private static final ThreadLocal<Connection> context = new ThreadLocal();
    
    private String path = "jdbc:mysql://localhost/gec";
    private String user = "lucas";
    private String pass = "oficial28";
    
    public Connection getConexao() {
        Connection conn = null;
        try {
            conn = DriverManager.getConnection(path, user, pass);
        } catch (SQLException ex) {
            Logger.getLogger(BD.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        return conn;
    }
}